Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: close logging-channels when closing channels #5592

Merged
merged 9 commits into from
Sep 14, 2024

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Sep 13, 2024

This is essentially a continuation of #4928 (or rather: I took the changes and applied them to the current code). Channels are now removed from the logger when they're destructed. If the app is being destroyed, they're not unregistered (they will be "unregistered" when the singleton is destructed). When a channel is destroyed (e.g. due to the user closing all tabs with the channel), its LoggingChannel, which holds the file handle, is destroyed. This also causes a stop-logging message to be inserted. Previously, that message was only appended when the app was closed. I'd argue that was a bug, since there weren't any messages logged.

I couldn't help myself but rename ChatterChatters to ChannelChatters, add a space to the stop message, and resolve some clang-tidy suggestions.

@pajlada pajlada merged commit 694cc2d into Chatterino:master Sep 14, 2024
18 checks passed
@Nerixyz Nerixyz deleted the fix/logging-locker branch September 14, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants